home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / content / nsIXMLContent.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-05-08  |  3.1 KB  |  77 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is Mozilla Communicator client code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *   Peter Annema <disttsc@bart.nl>
  24.  *
  25.  * Alternatively, the contents of this file may be used under the terms of
  26.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  27.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  28.  * in which case the provisions of the GPL or the LGPL are applicable instead
  29.  * of those above. If you wish to allow use of your version of this file only
  30.  * under the terms of either the GPL or the LGPL, and not to allow others to
  31.  * use your version of this file under the terms of the MPL, indicate your
  32.  * decision by deleting the provisions above and replace them with the notice
  33.  * and other provisions required by the GPL or the LGPL. If you do not delete
  34.  * the provisions above, a recipient may use your version of this file under
  35.  * the terms of any one of the MPL, the GPL or the LGPL.
  36.  *
  37.  * ***** END LICENSE BLOCK ***** */
  38.  
  39. #ifndef nsIXMLContent_h___
  40. #define nsIXMLContent_h___
  41.  
  42. #include "nsISupports.h"
  43. #include "nsIStyledContent.h"
  44.  
  45. class nsIDocShell;
  46.  
  47. #define NS_IXMLCONTENT_IID \
  48.  { 0xb9df7adc, 0x3262, 0x4692, \
  49.  { 0xbb, 0x97, 0xb7, 0xd5, 0xab, 0xdf, 0x85, 0x9c } }
  50.  
  51. /**
  52.  * XML content extensions to nsIContent
  53.  */
  54. class nsIXMLContent : public nsIStyledContent {
  55. public:
  56.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IXMLCONTENT_IID)
  57.   
  58.   /**
  59.    * Give this element a chance to fire links that should be fired
  60.    * automatically when loaded. If the element was an autoloading link
  61.    * and it was succesfully handled, we will throw special nsresult values.
  62.    *
  63.    * @param aShell the current doc shell (to possibly load the link on)
  64.    * @throws NS_OK if nothing happened
  65.    * @throws NS_XML_AUTOLINK_EMBED if the caller is loading the link embedded
  66.    * @throws NS_XML_AUTOLINK_NEW if the caller is loading the link in a new
  67.    *         window
  68.    * @throws NS_XML_AUTOLINK_REPLACE if it is loading a link that will replace
  69.    *         the current window (and thus the caller must stop parsing)
  70.    * @throws NS_XML_AUTOLINK_UNDEFINED if it is loading in any other way--in
  71.    *         which case, the caller should stop parsing as well.
  72.    */
  73.   NS_IMETHOD MaybeTriggerAutoLink(nsIDocShell *aShell) = 0;
  74. };
  75.  
  76. #endif // nsIXMLContent_h___
  77.